#include "Searcher.hpp"
const std::string output = "data/raw_html/output.txt";
#include <cstring>
#include <cstdio>
int main()
{
    ns_searcher::Searcher searcher;

    searcher.Init(output); 
    std::string query;
    std::string jsonstring;
    char buffer[1024];
    while(true)
    {
        std::cout << "Please Input your Search word: ";
        fgets(buffer,sizeof(buffer)-1,stdin);
        buffer[strlen(buffer)-1] = 0;
        query = buffer;
        searcher.Search(query,&jsonstring);
        std::cout << jsonstring << std::endl;
    }
    return 0;
}